<!DOCTYPE html>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %>
<%@ include file="../core/core.jsp"%>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="renderer" content="webkit">

    <title>资源管理</title>
    <meta name="keywords" content="叮当猫">
    <meta name="description" content="叮当猫">
    <link href="../static/css/style.min.css" rel="stylesheet">

    <style>
        table.dataTable thead .sorting:after{
            content:'';
        }
    </style>
</head>

<body>

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>基本 <small>查找，结果</small></h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">

                    <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid"><div class="row" style="margin-bottom: 20px;">
                        <div class="col-sm-10">
                            <div id="DataTables_Table_0_filter" class="dataTables_filter">
                                <div class="form-group"><label>状态</label>
                                    <select name="state" id="state" style="width:200px;height: 34px;">
                                        <option value="1">正常</option>
                                        <option value="0">无效</option>
                                    </select>
                                </div>
                                <div class="form-group m-l"><label>资源类型：</label>
                                    <select name="type" id="type" style="width:200px;height: 34px;">
                                        <option value="">请选择</option>
                                        <option value="1">URL</option>
                                        <option value="2">子菜单</option>
                                        <option value="3">按钮</option>
                                        <option value="4">父菜单</option>
                                    </select>
                                </div>
                                <div class="form-group m-l"><label>父菜单</label>
                                    <select name="faMenu" id="faMenu" style="width:200px;height: 34px;" disabled>
                                        <option value="">请选择</option>
                                    </select>
                                </div>
                                <button class="btn btn-primary m-l" id="refer">查询</button>
                                <button class="btn btn-primary m-l" id="add" data-toggle="modal" data-target="#myModal5">添加</button>
                                <button class="btn btn-primary m-l" id="tree">资源管理树</button>
                            </div>
                        </div>
                    </div>
                        <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <h4 class="modal-title">添加系统资源</h4>
                                    </div>
                                    <div class="modal-body">
                                        <div class="form-group"><label>名称</label> <input type="text" id="name" class="form-control"></div>
                                        <div class="form-group"><label>资源标签名</label> <input type="text" id="permissionName" class="form-control"></div>
                                        <div class="form-group"><label>资源类型</label>
                                            <select name="addType" id="addType" style="width:200px;height: 34px;">
                                                <option value="">请选择</option>
                                                <option value="1">URL</option>
                                                <option value="2">子菜单</option>
                                                <option value="3">按钮</option>
                                                <option value="4">父菜单</option>
                                            </select>
                                        </div>
                                        <div class="form-group" style="display: none;" id="addfaBox"><label>父菜单</label>
                                            <select name="addfaMenu" id="addfaMenu" style="width:200px;height: 34px;">
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                        <div class="form-group"><label>资源说明</label> <input type="text" id="explain" class="form-control"></div>
                                        <div class="form-group"><label>URL</label> <input type="text" id="url" class="form-control"></div>
                                        <div class="form-group"><label>URL初始化权限</label> <input type="text" id="permission" class="form-control"></div>
                                        <div class="form-group" style="color: #f00">URL权限填写说明：
                                            authc表示需要认证(登录)才能使用，没有参数。roles[systemAdmin]表示必须拥有“systemAdmin”的角色才可访问。perms[menu:tixianAudit:list] 表示必须拥有“menu:tixianAudit:list”的资源才可访问。(配置完成，请重启服务器)</div>
                                        <div class="form-group"><label>序号</label> <input type="text" id="number" class="form-control" onchange="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')"></div>
                                    </div>

                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-white" data-dismiss="modal" id="close">关闭</button>
                                        <button type="button" class="btn btn-primary" id="save">保存</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal inmodal fade" id="myModal4" tabindex="-1" role="dialog"  aria-hidden="true">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <h4 class="modal-title">资源管理树</h4>
                                    </div>
                                    <div class="modal-body">
                                        <div id="urlBox"></div>
                                        <div id="jstree1">
                                            <ul id="treeBox">

                                            </ul>
                                        </div>
                                    </div>

                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-white" data-dismiss="modal" id="close2">关闭</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
                            <thead>
                            <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 60px;" aria-sort="ascending">#</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">显示名称</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">资源标签名</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">资源类型</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">资源说明</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">父类资源名称</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">URL</th>
                                <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 300px;">状态</th>
                            </tr>
                            </thead>
                            <tbody id="withdraw-record">
                            <!--<tr class="gradeA odd">-->
                            <!--<td class="sorting_1">14</td>-->
                            <!--<td class=" ">100</td>-->
                            <!--<td class=" ">2</td>-->
                            <!--<td class="center ">ky</td>-->
                            <!--<td class="center ">待审核</td>-->
                            <!--<td class="sorting_1">15093112512</td>-->
                            <!--<td class=" ">1</td>-->
                            <!--<td class=" ">2017-02-01 09:09</td>-->
                            <!--<td class="center ">z-097967897878978</td>-->
                            <!--<td class="center ">2017-02-02 10:10</td>-->
                            <!--</tr>-->
                            </tbody>
                        </table><div class="row"><div class="col-sm-6"><div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <span id="record"></span> 项</div></div><div class="col-sm-6"><div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate"><ul class="pagination"><li class="paginate_button previous disabled" aria-controls="DataTables_Table_0" tabindex="0" id="DataTables_Table_0_previous"><a href="#">上一页</a></li><li class="paginate_button active" aria-controls="DataTables_Table_0" tabindex="0"><a href="#">1</a></li><li class="paginate_button " aria-controls="DataTables_Table_0" tabindex="0"><a href="#">2</a></li><li class="paginate_button " aria-controls="DataTables_Table_0" tabindex="0"><a href="#">3</a></li><li class="paginate_button " aria-controls="DataTables_Table_0" tabindex="0"><a href="#">4</a></li><li class="paginate_button " aria-controls="DataTables_Table_0" tabindex="0"><a href="#">5</a></li><li class="paginate_button " aria-controls="DataTables_Table_0" tabindex="0"><a href="#">6</a></li><li class="paginate_button next" aria-controls="DataTables_Table_0" tabindex="0" id="DataTables_Table_0_next"><a href="#">下一页</a></li></ul></div></div></div></div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- jsTree plugin javascript -->
<script src="../static/js/jstree.min.js"></script>
<style>
    .jstree-open > .jstree-anchor > .fa-folder:before {
        content: "\f07c";
    }
    .jstree-default .jstree-icon.none {
        width: 0;
    }
</style>
<script src="../static/js/resource/resource.js" charset="utf-8"></script>

</body>

</html>
